package com.syni.mdd.yhd.common.all.dto.requestDto.groupChart;

import com.syni.mdd.yhd.common.all.dto.requestDto.BaseReDto;
import com.syni.mdd.yhd.common.all.validationGroup.GroupInsert;
import com.syni.mdd.yhd.common.all.validationGroup.GroupUpdate;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @className ChatAnnounReDto
 * @description TOO
 * @Author cfx
 * @DATE 2019/9/9 15:58
 * @VERSION 1.0
 **/
@Data
public class ChatAnnounReDto extends BaseReDto {
    @NotNull(groups = {GroupInsert.class, GroupUpdate.class})
    private Integer businessId;

    private String announImg;

    @NotNull(groups = {GroupInsert.class})
    @Size(max = 500,groups = {GroupInsert.class})
    private String content;

    //@NotNull(groups = {GroupInsert.class})
    private Integer chatId;

    private Integer businessCouponId;

    private Integer activityId;

    public void setAnnounImg(String announImg) {
        this.announImg = announImg.replace("\\\\","");
    }
}
